#ifndef C_SHDL_H
#define C_SHDL_H

#ifdef __cplusplus
extern "C" {
#endif
typedef  void* tPtr;

#ifndef SHDL_OFFSETOF
#define SHDL_OFFSETOF(type, member) ((char*)&((type*)0)->member - (char*)0)
#endif

void Linklist_append(tPtr* head, char next_diff, tPtr new_node) ;
void Linklist_prepend(tPtr* head, char next_diff, tPtr new_node) ;
tPtr Linklist_removeFirst(tPtr* head, char next_diff);
tPtr Linklist_removeLast(tPtr* head, char next_diff);
int Linklist_foreach(tPtr* head, char next_diff, int (*callback)(tPtr node, void* tag), void* tag) ;
int Linklist_removeIf(tPtr* head, char next_diff, int (*predicate)(tPtr node, void* tag), void* tag) ;


#ifdef __cplusplus
}
#endif

#endif // C_SHDL_H


